%1.2-2
y=randn(1,400);
x=1:400;
bits=4:4:16;
i=1;
N=[];
for b=bits
    y2=bitround(y,b);
    figure(1);
    subplot(2,2,i);
    hist(y2-y);
    title(sprintf('hist with %d bits',b));
    xlabel('foutmarge');
    ylabel('aantal');

    figure(2);
    subplot(2,2,i);
    stem(x,y2-y);
    title(sprintf('plot with %d bits',b));
    xlabel('n');
    ylabel('y difference');
    i=i+1;
end